home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Suzy B Software 2
/
Suzy B Software CD-ROM 2 (1994).iso
/
extras
/
programm
/
gemfsc20
/
gemfsc20.lzh
/
GEMFUNCS
/
EVNXMULT.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-03-28
|
4KB
|
125 lines
/**************************************************************************
* EVNXMULT.C - Extended event_multi() routine...
*************************************************************************/
#include "gemfintl.h"
short evnx_multi(xm)
register XMULTI *xm;
{
return xm->mwhich = evnt_multi(xm->mflags,
xm->mbclicks,
xm->mbmask,
xm->mbstate,
xm->mm1flags,
RECTVALS(&xm->mm1rect),
xm->mm2flags,
RECTVALS(&xm->mm2rect),
xm->msgbuf,
(short)(xm->mtcount & 0x0000FFFF),
(short)((unsigned long)xm->mtcount >> 16),
&xm->mmox,
&xm->mmoy,
&xm->mmobutton,
&xm->mmokstate,
&xm->mkreturn,
&xm->mbreturn);
}
/* here's how we'd like to do it for HSC...
#pragma asm
;========================================================================
; EVNXMULT.S - Extended evnt_multi() binding.
;========================================================================
.data
;-------------------------------------------------------------------------
; Define the offsets within the AES block storage area.
;-------------------------------------------------------------------------
aespb = 0 ; 'aespb' MUST be first!...
pcontrl = 0 ; Pointer to control array
pglobal = 4 ; Pointer to global array
pintin = 8 ; Pointer to intin array
pintout = 12 ; Pointer to intout array
padrin = 16 ; Pointer to adrin array
padrout = 20 ; Pointer to adrout array
control = 24 ; Control array is next...
function = 24 ; Function code
sintin = 26 ; size of intin
sintout = 28 ; size of intout
sadrin = 30 ; size of adrin
sadrout = 32 ; size of adrout
global = 34 ; Global array, needs no further def.
; offsets into the XMULTI structure
msgbuf = 0 ; ds.w 8
mflags = 16 ; ds.w 1
mbclicks = 18 ; ds.w 1
mbmask = 20 ; ds.w 1
mbstate = 22 ; ds.w 1
mm1flags = 24 ; ds.w 1
mm1rect = 26 ; ds.w 4
mm2flags = 34 ; ds.w 1
mm2rect = 36 ; ds.w 4
mtcount = 44 ; ds.w 1
mwhich = 48 ; ds.w 1
mmox = 50 ; ds.w 1
mmoy = 52 ; ds.w 1
mmobutton = 54 ; ds.w 1
mmokstate = 56 ; ds.w 1
mkreturn = 58 ; ds.w 1
mbreturn = 60 ; ds.w 1
pmstruct = 4
.text
.globl _evnx_multi
_evnx_multi:
move.l #$19100701,d0 ; AControl 25,16,7,1
lea aesblock,a0 ; Load pointer to AES block,
movep.l d0,control+1(a0) ; fill in the control array,
exg a2,d2 ; save a2 register for Laser C.
lea pmstruct(sp),a2 ; make double-indirect pointer
move.l a2,padrin(a0) ; to msgbuf, store as adrin pointer.
move.l (a2),a2 ; get pointer to evnx_multi struct.
move.l mtcount(a2),d0
swap d0
move.l d0,mtcount(a2)
lea mflags(a2),a1 ; get pointer to intin part of
move.l a1,pintin(a0) ; evnx_multi structure, store it.
lea mwhich(a2),a1 ; get pointer to intout part of
move.l a1,pintout(a0) ; evnx_multi structure, store it.
exg a2,d2 ; restore a2 register.
move.l a0,d1 ; move the aespb pointer to the
move.w #$C8,d0 ; interface register, also the AES
trap #2 ; function code, call AES.
move.l pmstruct(sp),a0 ; get pointer to evnx_multi struct,
move.l mtcount(a0),d0
swap d0
move.l d0,mtcount(a0)
move.w mwhich(a0),d0 ; return event flags in d0, with
rts ; CCR regs set for Laser C.
#pragma endasm
*/